package com.hqyj.lls.service;

import com.hqyj.lls.entity.MyFile;
import com.hqyj.lls.utils.ResultUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public interface MyFileService {

    //查所有
    ResultUtils fileList();
    //增加
    ResultUtils insert(MyFile myFile);

    //文档的上传 MultipartFile.transferTo 将接收到的文件传输到给定的目标文件
    ResultUtils upload(MultipartFile multipartFile, HttpServletRequest request);

    //文档的下载
    ResponseEntity<byte[]> downLoad(String fileName, HttpServletRequest request) throws IOException;

}
